﻿// <copyright file="Photo.cs" company="Microsoft Corporation">
// Copyright (c) 2009 Microsoft Corporation All Rights Reserved
// </copyright>
// <author>Michael S. Scherotter</author>
// <email>mischero@microsoft.com</email>
// <date>2008-09-23</date>
// <summary>The Silverlight Application</summary>

namespace MyOpenSpace
{
    using System.Windows.Browser;

    /// <summary>
    /// MySpace Photo
    /// </summary>
    public class Photo
    {
        /// <summary>
        /// Photo script object
        /// </summary>
        private ScriptObject photo;

        /// <summary>
        /// Initializes a new instance of the Photo class.
        /// </summary>
        /// <param name="photo">MySpace photo script object</param>
        internal Photo(ScriptObject photo)
        {
            this.photo = photo;
        }

        /// <summary>
        /// Returns the field specified by the key
        /// </summary>
        /// <param name="key">the field key</param>
        /// <returns>the field value</returns>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "get", Justification = "Mirroring OpenSocial API.")]
        public object getField(string key)
        {
            return this.photo.Invoke("getField", key);
        }
    }
}
